package com.reform.controller.expert;


import com.reform.res.Result;
import com.reform.service.IExpertLabelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

/**
 * <p>
 * 专家标签绑定 前端控制器
 * </p>
 *
 * @author mortale
 * @since 2021-08-13
 */
@Api(tags = "ExpertLabelController")
@RestController
@RequestMapping("/expert-label")
public class ExpertLabelController {

    @Autowired
    IExpertLabelService expertLabelService;
    
    @ApiOperation(value = "创建专家信息", notes = "创建专家信息")
    @PostMapping("/creatExpertLabel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "expertLabels", value = "专家信息JSON字符串数组", paramType = "query", dataTypeClass = String.class, required = true),
    })
    public Result creatExpertLabel(String expertLabels) throws SQLException {
        return expertLabelService.creatExpertLabel(expertLabels);
    }

    @ApiOperation(value = "删除专家信息", notes = "删除专家信息")
    @PostMapping("/deleteExpertLabel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "expertLabels", value = "专家信息JSON字符串数组", paramType = "query", dataTypeClass = String.class, required = true),
    })
    public Result deleteExpertLabel(String expertLabels) throws SQLException {
        return expertLabelService.deleteExpertLabel(expertLabels);
    }
}
